/* 培训模块样式 */
:root {
  --primary-color: #4a90e2;
  --primary-light: #e8f1fd;
  --primary-dark: #3a7bc8;
  --accent-color: #5cc489;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --success-color: #5cc489;
  --warning-color: #ffb74d;
  --danger-color: #ff7373;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
}

/* 全局样式 */
body {
  font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-light);
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

.app-container {
  max-width: 100%;
  margin: 0 auto;
  padding-bottom: 60px;
}

/* 顶部状态栏 */
.app-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: var(--spacing-sm) var(--spacing-md);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.status-bar {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding-bottom: 4px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-xs) 0;
}

.header-content h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.back-btn {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding-right: var(--spacing-md);
}

.header-actions {
  display: flex;
  gap: var(--spacing-md);
}

/* 卡片样式 */
.card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* 学习进度卡片 */
.learning-progress {
  background: linear-gradient(to right, #4a90e2, #5cc489);
  color: white;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.progress-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.badge {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
}

.progress-bar-container {
  margin: var(--spacing-md) 0;
}

.progress-bar {
  height: 8px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 14px;
  margin-top: var(--spacing-xs);
  text-align: right;
}

.cert-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--spacing-md);
  font-size: 14px;
}

.view-more {
  color: white;
  text-decoration: none;
}

/* 课程导航 */
.course-nav {
  display: flex;
  overflow-x: auto;
  background-color: white;
  margin: 0 var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-top: -15px;
  position: relative;
  z-index: 10;
}

.course-nav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  padding: var(--spacing-md);
  white-space: nowrap;
  font-size: 14px;
  position: relative;
  color: var(--text-secondary);
}

.nav-item.active {
  color: var(--primary-color);
  font-weight: 600;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--spacing-md);
  right: var(--spacing-md);
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px 3px 0 0;
}

/* 继续学习卡片 */
.continue-learning h2 {
  margin-top: 0;
  font-size: 16px;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.course-card {
  display: flex;
  gap: var(--spacing-md);
  background-color: var(--bg-white);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.course-img {
  position: relative;
  width: 120px;
  height: 90px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.course-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.progress-tag {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 2px 6px;
  font-size: 10px;
  border-radius: 4px 0 0 0;
}

.course-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-info h3 {
  margin: 0 0 var(--spacing-xs);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.course-desc {
  margin: 0 0 var(--spacing-xs);
  font-size: 12px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: var(--spacing-xs);
}

/* 推荐课程区域 */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.card-header h2 {
  margin: 0;
  font-size: 16px;
  color: var(--text-primary);
}

.more {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
}

.course-list {
  display: flex;
  gap: var(--spacing-md);
  overflow-x: auto;
  padding-bottom: var(--spacing-sm);
  -webkit-overflow-scrolling: touch;
}

.course-list::-webkit-scrollbar {
  height: 4px;
}

.course-list::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 2px;
}

.course-item {
  flex: 0 0 140px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.course-item .course-img {
  width: 140px;
  height: 90px;
}

.course-brief {
  padding: var(--spacing-xs);
}

.course-brief h3 {
  margin: var(--spacing-xs) 0;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-stats {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-light);
}

/* 考试任务 */
.exam-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.exam-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm);
  background-color: var(--bg-light);
  border-radius: var(--radius-sm);
}

.exam-item.urgent {
  border-left: 4px solid var(--danger-color);
}

.exam-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--spacing-md);
}

.exam-info {
  flex: 1;
}

.exam-info h3 {
  margin: 0 0 var(--spacing-xs);
  font-size: 14px;
  font-weight: 500;
}

.exam-deadline {
  margin: 0;
  font-size: 12px;
  color: var(--text-light);
}

.exam-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--spacing-xs);
}

.badge-urgent {
  background-color: var(--danger-color);
  color: white;
}

/* 技能提升 */
.skill-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.skill-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-xs);
}

.skill-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.skill-name {
  font-size: 12px;
  color: var(--text-primary);
}

/* 题库练习 */
.practice-types {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

.practice-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.practice-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-xs);
}

.practice-name {
  font-size: 12px;
  color: var(--text-primary);
}

/* 学习成就 */
.achievement-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.achievement-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm);
  background-color: var(--bg-light);
  border-radius: var(--radius-sm);
}

.achievement-icon {
  width: 50px;
  height: 50px;
  margin-right: var(--spacing-md);
  flex-shrink: 0;
}

.achievement-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.achievement-info {
  flex: 1;
}

.achievement-info h3 {
  margin: 0 0 var(--spacing-xs);
  font-size: 14px;
  font-weight: 500;
}

.achievement-info p {
  margin: 0;
  font-size: 12px;
  color: var(--text-light);
}

.achievement-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--spacing-xs);
  min-width: 60px;
}

.achievement-progress .progress-bar {
  width: 60px;
  height: 4px;
}

.achievement-progress span {
  font-size: 12px;
  color: var(--text-secondary);
}

.achievement-item.completed .achievement-status {
  color: var(--success-color);
}

/* 按钮样式 */
.btn {
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-light);
}

/* 底部导航栏 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: white;
  display: flex;
  justify-content: space-around;
  padding: var(--spacing-xs) 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-light);
  font-size: 12px;
}

.nav-icon {
  font-size: 20px;
  margin-bottom: 2px;
}

.nav-item.active {
  color: var(--primary-color);
}

/* 响应式调整 */
@media (min-width: 768px) {
  .app-container {
    max-width: 768px;
  }
  
  .course-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 动画效果 */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.btn-primary:active {
  animation: pulse 0.3s ease;
}

/* 图标样式 */
.icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-light: #1a1a1a;
    --bg-white: #2a2a2a;
    --text-primary: #f0f0f0;
    --text-secondary: #c0c0c0;
    --text-light: #909090;
    --border-color: #3a3a3a;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
  }
} 